﻿using System;

namespace Coding4Fun.Maelstrom.Common
{
	public sealed class Settings
	{
		private const string _gameConsoleIp_Player1 = "192.168.1.100";
		private const string _gameConsoleIp_Player2 = "192.168.1.200";

		private const string _controllerIp_Player1 = "192.168.1.101";
		private const string _controllerIp_Player2 = "192.168.1.201";

		private const string _cameraLeftIp_Player1 = "192.168.1.121";
		private const string _cameraLeftIp_Player2 = "192.168.1.220";

		private const string _cameraRightIp_Player1 = "192.168.1.120";
		private const string _cameraRightIp_Player2 = "192.168.1.221";

		private const string _hardwareIp_Player1 = "192.168.1.140";
		private const string _hardwareIp_Player2 = "192.168.1.240";

		private const string AxisCameraUrl = "/axis-cgi/mjpg/video.cgi?resolution=1280x800";

#if !NETMF
		// Set to "null" to not use the cameras
		public static Uri CameraUriLeft_Player1		{ get { return new Uri("http://" + _cameraLeftIp_Player1 + AxisCameraUrl); } }
		public static Uri CameraUriRight_Player1	{ get { return new Uri("http://" + _cameraRightIp_Player1 + AxisCameraUrl); } }

		public static Uri CameraUriLeft_Player2		{ get { return new Uri("http://" + _cameraLeftIp_Player2 + AxisCameraUrl); } }
		public static Uri CameraUriRight_Player2	{ get { return new Uri("http://" + _cameraRightIp_Player2 + AxisCameraUrl); } }
#endif

		// these need to match the IPs of the machines the GameConsole app is running on
		public static string GameConsoleIp_Player1	{ get { return _gameConsoleIp_Player1; } }
		public static string GameConsoleIp_Player2	{ get { return _gameConsoleIp_Player2; } }

		// these need to match the IPs of the machines the Tablet app is running on
		public static string ControllerIp_Player1	{ get { return _controllerIp_Player1; } }
		public static string ControllerIp_Player2	{ get { return _controllerIp_Player2; } }

		// these need to match the IPs of the hardware devices
		public static string HardwareIp_Player1		{ get { return _hardwareIp_Player1; } }
		public static string HardwareIp_Player2		{ get { return _hardwareIp_Player2; } }

		// don't change these unless there's some kind of conflict...
		public static int ControllerPort_Player1	{ get { return 12345; } }
		public static int ControllerPort_Player2	{ get { return 12346; } }

		public static int GameConsolePort			{ get { return 54321; } }

		// set to true/false to use the NETMF hardware
		public static bool UseHardware				{ get { return true; } }

		// constrain paddle to single finger
		public static bool ConstrainSingleTouch		{ get { return false; } }
	}
}